package com.zbkj.crmeb.store.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
public class AddDiscountRequest implements Serializable {

    @ApiModelProperty(value = "折扣id")
    private Integer id;

    @ApiModelProperty(value = "供应商id")
    @NotNull(message = "供应商不能为空")
    private Integer supplierId;

    @ApiModelProperty(value = "折扣")
    @NotNull(message = "折扣不能为空")
    @Min(value = 1)
    @Max(value = 100)
    private Integer discount;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

}